Optimal. Leaf size=232 \[ \frac {4 a^2 (136 A+156 B+189 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 a^2 (136 A+156 B+189 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^2 (52 A+72 B+63 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+3 B) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{21 d}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 232, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {4350, 4171,
4102, 4100, 3890, 3889} \begin {gather*} \frac {2 a^2 (52 A+72 B+63 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a^2 (136 A+156 B+189 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {4 a^2 (136 A+156 B+189 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}+\frac {2 a (A+3 B) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}{21 d}+\frac {2 A \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x) (a \sec (c+d x)+a)^{3/2}}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3889
Rule 3890
Rule 4100
Rule 4102
Rule 4171
Rule 4350
Rubi steps
\begin {align*} \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d}+\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {(a+a \sec (c+d x))^{3/2} \left (\frac {3}{2} a (A+3 B)+\frac {1}{2} a (4 A+9 C) \sec (c+d x)\right )}{\sec ^{\frac {7}{2}}(c+d x)} \, dx}{9 a}\\ &=\frac {2 a (A+3 B) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{21 d}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d}+\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)} \left (\frac {1}{4} a^2 (52 A+72 B+63 C)+\frac {1}{4} a^2 (40 A+36 B+63 C) \sec (c+d x)\right )}{\sec ^{\frac {5}{2}}(c+d x)} \, dx}{63 a}\\ &=\frac {2 a^2 (52 A+72 B+63 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+3 B) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{21 d}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d}+\frac {1}{105} \left (a (136 A+156 B+189 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (136 A+156 B+189 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^2 (52 A+72 B+63 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+3 B) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{21 d}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d}+\frac {1}{315} \left (2 a (136 A+156 B+189 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {4 a^2 (136 A+156 B+189 C) \sin (c+d x)}{315 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 a^2 (136 A+156 B+189 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a^2 (52 A+72 B+63 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (A+3 B) \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{21 d}+\frac {2 A \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.53, size = 123, normalized size = 0.53 \begin {gather*} \frac {a \sqrt {\cos (c+d x)} (2689 A+2964 B+3276 C+2 (799 A+759 B+756 C) \cos (c+d x)+4 (137 A+117 B+63 C) \cos (2 (c+d x))+170 A \cos (3 (c+d x))+90 B \cos (3 (c+d x))+35 A \cos (4 (c+d x))) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{1260 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 154, normalized size = 0.66
method | result | size |
default | \(-\frac {2 a \left (-1+\cos \left (d x +c \right )\right ) \left (35 A \left (\cos ^{4}\left (d x +c \right )\right )+85 A \left (\cos ^{3}\left (d x +c \right )\right )+45 B \left (\cos ^{3}\left (d x +c \right )\right )+102 A \left (\cos ^{2}\left (d x +c \right )\right )+117 B \left (\cos ^{2}\left (d x +c \right )\right )+63 C \left (\cos ^{2}\left (d x +c \right )\right )+136 A \cos \left (d x +c \right )+156 B \cos \left (d x +c \right )+189 C \cos \left (d x +c \right )+272 A +312 B +378 C \right ) \left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{315 d \sin \left (d x +c \right )}\) | \(154\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 703 vs.
\(2 (202) = 404\).
time = 0.67, size = 703, normalized size = 3.03 \begin {gather*} \frac {\sqrt {2} {\left (3780 \, a \cos \left (\frac {8}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 1050 \, a \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 378 \, a \cos \left (\frac {4}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 135 \, a \cos \left (\frac {2}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) - 3780 \, a \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {8}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 1050 \, a \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 378 \, a \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {4}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) - 135 \, a \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) \sin \left (\frac {2}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 70 \, a \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 135 \, a \sin \left (\frac {7}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 378 \, a \sin \left (\frac {5}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 1050 \, a \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right ) + 3780 \, a \sin \left (\frac {1}{9} \, \arctan \left (\sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ), \cos \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right )\right )\right )\right )} A \sqrt {a} - 6 \, \sqrt {2} {\left (175 \, a \cos \left (\frac {7}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) - 5 \, {\left (35 \, a \cos \left (2 \, d x + 2 \, c\right ) + 6 \, a\right )} \sin \left (\frac {7}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - 126 \, a \sin \left (\frac {5}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - 175 \, a \sin \left (\frac {3}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - 1470 \, a \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )\right )} B \sqrt {a} - 504 \, {\left (10 \, \sqrt {2} a \cos \left (\frac {5}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) - 5 \, \sqrt {2} a \sin \left (\frac {3}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - 10 \, \sqrt {2} a \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right ) - {\left (10 \, \sqrt {2} a \cos \left (2 \, d x + 2 \, c\right ) + \sqrt {2} a\right )} \sin \left (\frac {5}{4} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right )\right )\right )\right )} C \sqrt {a}}{5040 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.97, size = 132, normalized size = 0.57 \begin {gather*} \frac {2 \, {\left (35 \, A a \cos \left (d x + c\right )^{4} + 5 \, {\left (17 \, A + 9 \, B\right )} a \cos \left (d x + c\right )^{3} + 3 \, {\left (34 \, A + 39 \, B + 21 \, C\right )} a \cos \left (d x + c\right )^{2} + {\left (136 \, A + 156 \, B + 189 \, C\right )} a \cos \left (d x + c\right ) + 2 \, {\left (136 \, A + 156 \, B + 189 \, C\right )} a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^{9/2}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________